/**
 * @addressof用于获取一个对象的地址，即使这个对象重载了&操作符 
 */

#include<thread>
#include<iostream>
#include<memory>

class T
{
private:
	int a = 1;
	int b = 2;
public:
	int* operator&(void) { return &b; }
};

int main(void)
{
	T t1;
	std::cout << &t1 << std::endl;    //打印&(t1.b)
	std::cout << std::addressof(t1) << std::endl; //打印t1的实际地址
}
